﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;

namespace CInChat.UI
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public static string User { get; set; }

        public App() {
            MainWindow window = new MainWindow();
            GetUser();
            if (string.IsNullOrEmpty(App.User)) {
                App.Current.Shutdown();
                return;
            }
            window.Show();
        }

        private void GetUser() {
            LoginWindow window = new LoginWindow();
            window.ShowDialog();
        }
    }
}
